
var KeyEvent = function (action, keyCode) {
  this.keyCode = keyCode
  this.action = action
}

KeyEvent.ACTION_DOWN = 'action.down'

KeyEvent.ACTION_UP = 'action.up'

/* 返回键 */
KeyEvent.KEYCODE_BACK = 4
/* 上 */
KeyEvent.KEYCODE_DPAD_UP = 19
/* 下 */
KeyEvent.KEYCODE_DPAD_DOWN = 20
/* 左 */
KeyEvent.KEYCODE_DPAD_LEFT = 21
/* 右 */
KeyEvent.KEYCODE_DPAD_RIGHT = 22
/* 确定键 */
KeyEvent.KEYCODE_DPAD_CENTER = KeyEvent.KEYCODE_DPAD_OK = 23
/* 菜单键 */
KeyEvent.KEYCODE_MENU = 82

KeyEvent.obtain = function (action, keyCode) {
  return new KeyEvent(action, keyCode)
}

export default KeyEvent
